package com.wtwd.campus.receiver;

import com.wtwd.campus.entity.MqGeneralValueResult;
import com.wtwd.campus.service.InjectFeignService;

public class ShutDownReceiver implements Receiver {
    @Override
    public String parseMessage(String data) {
        //*WT,8645612456878,SHUTDOWN,135503,030921,FDFFFFFF#
        String[] split = data.split(",");
        String imei=split[1];
        String messageType = split[2];
        String commandNumber=split[3];
        String deviceDate=split[4];
        String deviceStatus=split[5];
        MqGeneralValueResult mqGeneralValueResult=new MqGeneralValueResult();
        mqGeneralValueResult.setImei(imei);
        mqGeneralValueResult.setCommandNumber(commandNumber);
        mqGeneralValueResult.setDeviceStatus(deviceStatus);
        mqGeneralValueResult.setDeviceDate(deviceDate);
        mqGeneralValueResult.setDeviceTime(commandNumber);
        InjectFeignService.getIrmFeignClientService().shutDownWarning(mqGeneralValueResult);
        return imei;
    }
}
